﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BaseEntities;
using BusinessLogic;
using System.Data;

namespace Mock1Group6
{
    public partial class CheckBalance : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                Card card = new Card();
                card.CardNo = Session["CardNo"].ToString();
                DataTable dt = new DataTable();
                dt = AccountLogic.GetCheckBalance(card);
                Repeater1.DataSource = dt;
                Repeater1.DataBind();
            }
        }
        //button enter
        protected void btnEnter_Click(object sender, EventArgs e)
        {
            Card card = new Card();
            int ATMID1 = 1;
            card.CardNo = Session["CardNo"].ToString();
            LogLogic.SaveCheckBalance(ATMID1, card);
            Response.Redirect("FormMain.aspx");
        }
        //button5
        protected void OK_Click(object sender, EventArgs e)
        {
            Card card = new Card();
            int ATMID1 = 1;
            card.CardNo = Session["CardNo"].ToString();
            LogLogic.SaveCheckBalance(ATMID1, card);
            Response.Redirect("FormMain.aspx");
        }
        //button6
        protected void Cancel_Click(object sender, EventArgs e)
        {
            Card card = new Card();
            int ATMID1 = 1;
            card.CardNo = Session["CardNo"].ToString();
            LogLogic.SaveCheckBalance(ATMID1, card);
            Response.Redirect("FormMain.aspx");
        }
        //button cancel duoi
        protected void btnCancel_Click(object sender, EventArgs e)
        {

            Card card = new Card();
            int ATMID1 = 1;
            card.CardNo = Session["CardNo"].ToString();
            LogLogic.SaveCheckBalance(ATMID1, card);
            Response.Redirect("FormMain.aspx");
        }
    }
}